babl: properly handle large files on 32 bit systems
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 13 Oct 2017 16:39:02 +0000 (18:39 +0200)
committerØyvind Kolås <pippin@gimp.org>
Tue, 24 Oct 2017 12:11:01 +0000 (14:11 +0200)
commite952b997bc3a83f11ed183b01d365f8903f61f3f
tree496350fbc9d31f8709ba3c23eb66ec2d0873f640
parent541300d74abd65ed9c729b707b02b2d983e3b670
babl: properly handle large files on 32 bit systems

If large file support is enabled on 32 bit systems, it is possible
to trigger an out of boundary write with files larger than 2 GB.

Always check if fseek and ftell are successful and if the file is
small enough to fit into memory.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
babl/babl-util.c